/*
    Project: OCMF (Operant Chamber Management Framework)
    Version: 1.0
    Author: Copyright (C) 2010, Samuel Delaney & Andrew Harvey
    Licence:
        This file is part of OCMF.

            OCMF is free software: you can redistribute it and/or modify
            it under the terms of the GNU General Public License as published by
            the Free Software Foundation, either version 3 of the License, or
            (at your option) any later version.

            OCMF is distributed in the hope that it will be useful,
            but WITHOUT ANY WARRANTY; without even the implied warranty of
            MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
            GNU General Public License for more details.

            You should have received a copy of the GNU General Public License
            along with OCMF.  If not, see <http://www.gnu.org/licenses/>.
*/

#include <QString>

#ifndef INEQUALITY_H
#define INEQUALITY_H

class Inequality
{
public:
    enum InequalityTypes
    {
        GreaterThan,
        GreaterThanOrEqualTo,
        Equal,
        NotEqual,
        LessThan,
        LessThanOrEqualTo
    };

    static InequalityTypes Parse(QString value)
    {
        if(value == "GreaterThan") return GreaterThan;
        if(value == "GreaterThanOrEqualTo") return GreaterThanOrEqualTo;
        if(value == "Equal") return Equal;
        if(value == "NotEqual") return NotEqual;
        if(value == "LessThan") return LessThan;
        if(value == "LessThanOrEqualTo") return LessThanOrEqualTo;

        return Equal;
    }

    static QString ToString(InequalityTypes inequality)
    {
        if(inequality == GreaterThan) return "GreaterThan";
        if(inequality == GreaterThanOrEqualTo) return "GreaterThanOrEqualTo";
        if(inequality == Equal) return "Equal";
        if(inequality == NotEqual) return "NotEqual";
        if(inequality == LessThan) return "LessThan";
        if(inequality == LessThanOrEqualTo) return "LessThanOrEqualTo";

        return "Equal";
    }
};

#endif // INEQUALITY_H
